package com.jay.lang.intf;

import java.util.Arrays;
import java.util.List;

public class CharSequenceIntf {
	public static void main(String[] args) {
		CharSequence cs = "hello";

		System.out.println(cs);
		System.out.println(cs.charAt(1));
		System.out.println(cs.length());
		System.out.println(cs.toString());
		System.out.println(cs.subSequence(1, 3));

		List<String> list = Arrays.asList("foo", "bar", "waa");
		CharSequence[] cs1 = list.toArray(new CharSequence[list.size()]);
		System.out.println(Arrays.toString(cs1)); // [foo, bar, waa]
	}
}
